ostree/ot-builtin-fsck.c \
ostree/ot-builtin-init.c \
ostree/ot-builtin-log.c \
- ostree/ot-builtin-pull.c \
ostree/ot-builtin-run-triggers.c \
ostree/ot-builtin-remote.c \
ostree/ot-builtin-rev-parse.c \
ostree/ot-builtin-show.c \
$(NULL)
+
+if USE_LIBSOUP_GNOME
+ostree_SOURCES += ostree/ot-builtin-pull.c
+endif
ostree_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libotutil -I$(srcdir)/libostree -I$(srcdir)/ostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS)
ostree_LDADD = libotutil.la libostree.la $(OT_COREBIN_DEP_LIBS)
PKG_PROG_PKG_CONFIG
+GIO_DEPENDENCY="gio-unix-2.0 >= 2.28"
PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.28])
-PKG_CHECK_MODULES(OT_COREBIN_DEP, [libsoup-gnome-2.4 >= 2.34.0 gio-unix-2.0 >= 2.28])
+AC_ARG_WITH(soup-gnome,
+ AS_HELP_STRING([--without-soup-gnome], [Do not use libsoup-gnome (implies no pull support)]),
+ :, with_soup_gnome=maybe)
+if test x$with_soup_gnome != xno; then
+ PKG_CHECK_MODULES(OT_COREBIN_DEP, [libsoup-gnome-2.4 >= 2.34.0 $GIO_DEPENDENCY], have_soup_gnome=yes, have_soup_gnome=no)
+ if test x$have_soup_gnome = xno && test x$with_soup_gnome != xmaybe; then
+ AC_MSG_ERROR([libsoup-gnome is enabled but could not be found])
+ fi
+ if test x$have_soup_gnome = xyes; then
+ AC_DEFINE([HAVE_LIBSOUP_GNOME], [1], [Define if we have libsoup-gnome])
+ else
+ PKG_CHECK_MODULES(OT_COREBIN_DEP, [$GIO_DEPENDENCY])
+ fi
+else
+ PKG_CHECK_MODULES(OT_COREBIN_DEP, [$GIO_DEPENDENCY])
+fi
+
+AM_CONDITIONAL(USE_LIBSOUP_GNOME, test $with_soup_gnome != no)
AM_PATH_PYTHON
{ "commit", ostree_builtin_commit, 0 },
{ "compose", ostree_builtin_compose, 0 },
{ "log", ostree_builtin_log, 0 },
+#ifdef HAVE_LIBSOUP_GNOME
{ "pull", ostree_builtin_pull, 0 },
+#endif
{ "fsck", ostree_builtin_fsck, 0 },
{ "remote", ostree_builtin_remote, 0 },
{ "rev-parse", ostree_builtin_rev_parse, 0 },